﻿
Namespace WillStrohl.Modules.Lightbox

    Partial Public Class UploadView
        Inherits WNSPortalModuleBase

#Region " Private Members "

        Private Const c_Uploadify As String = "jquery.uploadify"
        Private Const c_ScriptTag As String = "<script language=""javascript"" type=""text/javascript"" src=""{0}""></script>"

        Private p_RequestedFolderPath As String = Null.NullString

#End Region

#Region " Properties "

        Protected ReadOnly Property RequestedFolderPath() As String
            Get
                If Not String.IsNullOrEmpty(Me.p_RequestedFolderPath) Then
                    Return Me.p_RequestedFolderPath
                End If

                Dim obj As Object = Request.QueryString("fldr")
                If Not obj Is Nothing Then
                    Me.p_RequestedFolderPath = obj.ToString
                End If

                Return Me.p_RequestedFolderPath
            End Get
        End Property

#End Region

#Region " Event Handlers "

        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Try

                DotNetNuke.Framework.jQuery.RequestRegistration()

                Me.BindData()

                ' Load the AutoComplete plugin script on every page load
                If Not Page.ClientScript.IsClientScriptBlockRegistered(c_Uploadify) Then
                    Page.ClientScript.RegisterClientScriptBlock( _
                        Me.GetType, _
                        c_Uploadify, _
                        String.Format(c_ScriptTag, String.Concat(Me.ControlPath, "js/uploadify/jquery.uploadify.min.js")), _
                        False)
                End If

            Catch exc As Exception ' Module failed to load
                ProcessModuleLoadException(Me, exc, Me.IsEditable)
            End Try
        End Sub

#End Region

#Region " Private Methods "

        Private Sub BindData()

        End Sub

        Private Sub LocalizeModule()

        End Sub

#End Region

    End Class

End Namespace